var tabs = document.getElementsByClassName('tab-head-div')
var contents = document.getElementsByClassName('tab-body-div')

for(var i=0;i<tabs.length;++i){
    tabs[i].onclick = function(){
        for(var j=0;j<contents.length;++j){
            if(tabs[j] == this){
                tabs[j].classList.add('current')
                contents[j].classList.add('current')
            }else{
                tabs[j].classList.remove('current')
                contents[j].classList.remove('current')
            }
        }
    }
}